package com.jf3q.sup.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jf3q.sup.domain.OutboundShipments;
import com.jf3q.sup.dto.OutboundShipmentsDto;
import com.jf3q.sup.service.OutboundShipmentsService;
import com.jf3q.sup.vo.OutboundShipmentsVo;
import com.jf3q.sup.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: .x77
 * @CreateTime:2024/3/25 16:54
 */
@RestController
@RequestMapping("/outboundShipments")
public class OutboundShipmentsController {
    @Autowired
    OutboundShipmentsService outboundShipmentsService;
    @PostMapping("/getPage")
    public ResultVo BePutInStorage(@RequestBody OutboundShipmentsDto outboundShipmentsDto){
        try {
            System.out.println("----->"+outboundShipmentsDto.getCarriersId());
            Page<OutboundShipmentsVo> page = outboundShipmentsService.listShipments(outboundShipmentsDto);
            return ResultVo.success("出库详细分页展示",page);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
